package com.bawei.library_common.log.logger

import com.bawei.library_common.log.LoggerLevel

/**
 * @Author : yaotianxue
 * @Time : On 2023/5/23 10:05
 * @Description : EmailCatLogger 打印输出到邮件
 */
class EmailLogger: ILogger {
    private var isDebug = true
    private var TAG = ""
    private var level = LoggerLevel.Debug
    private var url = ""
    private var loggerFormat = "(:=>$TAG %s-->%s)" //格式化 %s占位符


    override fun d(tag: String, log: String) {
        if(isDebug && level.ordinal >= LoggerLevel.Debug.ordinal){

        }
    }

    override fun v(tag: String, log: String) {
        if(isDebug && level.ordinal >= LoggerLevel.Verbose.ordinal){

        }
    }

    override fun i(tag: String, log: String) {
        if(isDebug && level.ordinal >= LoggerLevel.Info.ordinal){

        }
    }

    override fun w(tag: String, log: String) {
        if(isDebug && level.ordinal >= LoggerLevel.Warn.ordinal){

        }
    }

    override fun e(tag: String, log: String) {
        if(isDebug && level.ordinal >= LoggerLevel.Error.ordinal){

        }
    }

    override fun setDebug(isDebug: Boolean) {
        this.isDebug  = isDebug
    }

    override fun setLogTAG(TAG: String) {
        this.TAG = TAG
    }

    override fun setLoggerLevel(level: LoggerLevel) {
        this.level = level
    }

    override fun setSaveUrl(url: String) {
        this.url = url
    }
}